
public class Book implements Comparable<Book> {

		public Book(String ISBN, String Author, String Titel) {
				this.Author = Author;
				this.ISBN = ISBN;
				this.Titel = Titel;
			}
		
		private String ISBN;
		private String Author;
		private String Titel;
		
		public String getISBN() {
			return ISBN;
		}
		public String getAuthor() {
			return Author;
		}
		public String getTitel() {
			return Titel;
		}
		
		public int compareTo(Book other) {
			if (other != null)
			if(this.getTitel().equals(other.getTitel()))
				if(this.getAuthor().equals(other.getAuthor()))
					if(this.getISBN().equals(other.getISBN()))
						return 0;
					else
						return this.getISBN().compareTo(other.getISBN());
				else
					return	this.getAuthor().compareTo(other.getAuthor());
			else
				return this.getTitel().compareTo(other.getTitel());
			
			return 0;
		}
		public String toString(){
			return Author+" - "+Titel+" - "+ISBN;
		}
}
